package abcy.cloud.syscoreserver.controller;

import abcy.cloud.syscoreserver.dto.resp.SysWhiteSelectRespDto;
import abcy.cloud.syscoreserver.services.SysWhiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/syswhite")
public class SysWhiteController {

    @Autowired
    private SysWhiteService sysWhiteService;

    @PostMapping(value = "/selectWhiteList")
    public Map<String, Object> selectWhiteList() {
        Map<String, Object> map = new HashMap<>();
        List<String> whiteList = sysWhiteService.selectWhiteList();
        map.put("whiteList", whiteList);
        return map;
    }
}
